#include <stdio.h>
double even(int n) {
    double sum=0.0;
    for(int i=2;i<=n;i+=2){
        sum+=1.0/i;
    }
    return sum;
}
double odd(int n){
    double sum=0.0;
    for(int i=1; i<=n;i+=2){
        sum+=1.0/i;
    }
    return sum;
}
int main() {
    int n;
    scanf("%d",&n);
    if (n%2==0){
        double result=even(n);
        printf("%lf\n",result);
    }
	else{
        double result=odd(n);
        printf("%lf\n",result);
    }
    return 0;
}
